Skip to content

Conversation

@marius-kilocode
Copy link
Collaborator

Migrate all types from CLI and agent manager to a common shared package @kilocode/code-schemas that now instead owns all of the type shared in between the CLI and the agent maanger

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

⚠️ No Changeset found

Latest commit: 357f2c7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 9, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR introduces a new @kilocode/core-schemas package that centralizes Zod schemas and TypeScript types for CLI configuration and runtime data. The refactoring consolidates type definitions that were previously scattered across the CLI codebase into a single, well-organized package.

Key Changes:

  • New packages/core-schemas package with Zod schemas for:
    • Provider configurations (40+ AI providers)
    • Auto-approval settings
    • CLI configuration
    • Authentication types
    • Agent manager types
    • MCP server types
    • Theme definitions
    • Keyboard input handling
    • Message schemas
  • CLI and extension now re-export types from @kilocode/core-schemas for backward compatibility
  • Minor documentation whitespace cleanup in adding-credits.md

Architecture Notes:

  • The package uses Zod's discriminated unions for type-safe provider configuration validation
  • Types are inferred from schemas using z.infer<> for consistency
  • Backward compatibility is maintained through re-exports with index signatures where needed
  • The package has @roo-code/types as a peer dependency for device auth types
Files Reviewed (17 files)
  • apps/kilocode-docs/docs/basic-usage/adding-credits.md - Whitespace cleanup
  • cli/package.json - Added @kilocode/core-schemas dependency
  • cli/src/auth/types.ts - Re-exports from core-schemas
  • cli/src/config/types.ts - Re-exports from core-schemas
  • packages/core-schemas/package.json - New package configuration
  • packages/core-schemas/tsconfig.json - TypeScript configuration
  • packages/core-schemas/tsup.config.ts - Build configuration
  • packages/core-schemas/src/index.ts - Main entry point
  • packages/core-schemas/src/config/index.ts - Config exports
  • packages/core-schemas/src/config/provider.ts - Provider schemas
  • packages/core-schemas/src/config/auto-approval.ts - Auto-approval schemas
  • packages/core-schemas/src/config/cli-config.ts - CLI config schema
  • packages/core-schemas/src/config/history.ts - History schemas
  • packages/core-schemas/src/auth/index.ts - Auth exports
  • packages/core-schemas/src/auth/kilocode.ts - Kilocode auth schemas
  • packages/core-schemas/src/agent-manager/index.ts - Agent manager exports
  • packages/core-schemas/src/agent-manager/types.ts - Agent manager schemas
  • packages/core-schemas/src/messages/index.ts - Message exports
  • packages/core-schemas/src/messages/cli.ts - CLI message schemas
  • packages/core-schemas/src/messages/extension.ts - Extension message schemas
  • packages/core-schemas/src/mcp/index.ts - MCP exports
  • packages/core-schemas/src/mcp/server.ts - MCP server schemas
  • packages/core-schemas/src/keyboard/index.ts - Keyboard exports
  • packages/core-schemas/src/keyboard/key.ts - Keyboard schemas
  • packages/core-schemas/src/theme/index.ts - Theme exports
  • packages/core-schemas/src/theme/theme.ts - Theme schemas
  • src/core/kilocode/agent-manager/types.ts - Re-exports from core-schemas
  • src/package.json - Added @kilocode/core-schemas dependency
  • pnpm-lock.yaml - Lock file updates

@marius-kilocode marius-kilocode requested a review from a team January 9, 2026 12:55
marius-kilocode and others added 10 commits January 12, 2026 09:50
Implements a new --attach flag to allow users to attach image files (png, jpg, jpeg, webp, gif, tiff) to CLI prompts in auto/yolo modes. Adds validation for mode requirements, file existence, and supported formats. Updates CLI options, types, and UI to support and process attachments.
@marius-kilocode marius-kilocode merged commit cd82a7c into main Jan 13, 2026
13 checks passed
@marius-kilocode marius-kilocode deleted the cli-core-schemas-pl branch January 13, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants